<#assign menu="brand">
<#assign submenu="brand_list">
<#include "../../manage/head.ftl">
<style type="text/css">
    .pagination {
        border-radius: 4px;
        display: inline-block;
        margin: 0;
        padding-left: 0;
    }

    .howto, .nonessential, #edit-slug-box, .form-input-tip, .subsubsub {
        color: #666666;
    }

    .subsubsub {
        float: left;
        font-size: 12px;
        list-style: none outside none;
        margin: 8px 0 5px;
        padding: 0;
    }

    .form-group {
        width: 100%;
    }

    .count {
        position: absolute;
        right: 0px;
    }

    .arrticle_status {
        float: left;
    }
</style>
<!--main content start-->
<section id="main-content">
    <section class="wrapper">

        <section class="panel">
            <header class="panel-heading">
                <div class="row">
                    <div class="col-lg-4">
                        <ul class="breadcrumb" style="margin-bottom:0px;">
                            <li>
                                <a href="${BASE_PATH}/manage/brand/list.htm">品牌列表</a>
                            </li>
                        </ul>
                    </div>
                    <div class="col-lg-8">
                        <a class="btn btn-primary" style="float:right;"
                           href="${BASE_PATH}/manage/brand/add.htm">添加品牌</a>
                    </div>
                </div>
            </header>
            <div class="panel-body">
                <div class="adv-table">
                    <div role="grid" class="dataTables_wrapper" id="hidden-table-info_wrapper">
                        <table class="table table-striped table-advance table-hover">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>品牌名</th>
                                <th>logo</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody role="alert" aria-live="polite" aria-relevant="all">
                            <#list pageVo.list as e>
                            <tr class="gradeA odd">
                                <td>${e.id}</td>
                                <td>
                                    <a href="${BASE_PATH}/manage/brand/update.htm?brandId=${e.id}">${e.name}</a>
                                </td>
                                <td>
                                    <a class="fancybox" rel="group" href="${e.logo}">
                                        <img src="${e.logo}" alt="img04" style="height:50px;">
                                    </a>
                                </td>
                                <td>

                                    <a href="${BASE_PATH}/manage/brand/update.htm?brandId=${e.id}" title="编辑品牌信息">
                                        编辑
                                    </a>
                                    |
                                    <a href="javascript:void(0);" class="js_brand_delete" brandId="${e.id}"
                                       title="是否删除品牌">
                                        删除
                                    </a>
                                </td>
                            </tr>
                            </#list>
                            </tbody>
                        </table>
                        <div style="height: 30px;">
                            <div class="pagination">${pageVo.pageNumHtml} </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- page end-->
    </section>
</section>
<!--main content end-->
<script>
    $(function () {
        var pageNum = "${p}";
        $('.js_brand_delete').click(function () {
            var brandId = $(this).attr('brandId');
            var status = "trash";
            bootbox.dialog({
                message: $(this).attr('title'),
                title: "提示",
                buttons: {
                    "delete": {
                        label: "确定",
                        className: "btn-success",
                        callback: function () {
                            $.post("${BASE_PATH}/manage/brand/delete.json", {"brandId": brandId}, function (data) {
                                window.location.reload();
                            }, "json");
                        }
                    },
                    "cancel": {
                        label: "取消",
                        className: "btn-primary",
                        callback: function () {

                        }
                    }
                }
            });
        });
    })

</script>

<#include "../../manage/foot.ftl">
